<?php

use think\facade\Route;
use app\admin\middleware\LoginMiddleware;
use app\admin\middleware\AuthMiddleware;
use app\admin\middleware\OperationLog;

Route::group('crontab', function () {
    //定时任务列表
    Route::get('lists', 'crontab.Crontab/lists');
    //添加定时任务
    Route::post('add', 'crontab.Crontab/add');
    //编辑定时任务
    Route::post('edit', 'crontab.Crontab/edit');
    //定时任务详情
    Route::get('detail', 'crontab.Crontab/detail');
    //删除定时任务
    Route::delete('delete', 'crontab.Crontab/delete');
    //操作定时任务
    Route::post('operate', 'crontab.Crontab/operate');
    //获取规则执行时间
    Route::get('expression', 'crontab.Crontab/expression');
})->middleware([
    LoginMiddleware::class,
    AuthMiddleware::class,
    OperationLog::class
]);